/* Estilo general del cuerpo */
* {
    box-sizing: border-box;
}
body {
	overflow-x: hidden;
	font-size: 16px; /* base accesible */
    line-height: 1.5; /* mejora lectura */
    font-family: "Century Gothic", "Gill Sans", Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    display: flex;
    flex-direction: column;
    text-align: center;
    min-height: 100vh; /* Permite que el body ocupe toda la altura */
}

/* Contenedor principal de noticias */
.noticias-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Tres columnas adaptables */
    gap: 20px; /* Espacio entre tarjetas */
    padding: 20px;
    background-color: #f4f4f4;
}

/* Estilo para cada tarjeta */
.noticia-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.noticia-card:hover {
    transform: scale(1.05); /* Efecto de agrandamiento */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

/* Imagen dentro de las tarjetas */
.noticia-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

/* Títulos de las noticias */
.noticia-card h3 {
    font-size: 18px;
    color: #333;
    margin: 10px 0;
}

/* Descripción breve */
.noticia-card p {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
}

/* Botón de "Ver más" */
.btn-ver-mas {
    background-color: #B51032;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-ver-mas:hover {
    background-color: #7d0f23;
}

.inicio_sesion {
    font-family: "Century Gothic", "Gill Sans", Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin-top: 250px;
    height: 100%;
    text-align: center;
}


.registar {
    font-family: "Century Gothic", "Gill Sans", Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin-top: 100px;
    height: 100%;
    text-align: center;
}


/* Título principal */
h1 {
	line-height: 1.3;
    color: #000;
    margin-bottom: 1em;
}

#imagen_fnb img{
    width:100%;        /* ocupa todo el ancho disponible */
    max-width:500px;   /* límite en pantallas grandes */
    height: auto;       /* mantiene proporción */
    display: block;
    margin: 0 auto;     /* centrado */
}

#imagen_principal img {
    width: 100%;
}

@media (max-width: 768px) {
    #imagen_fnb img {
        max-width: 90%;
    }
}
#imagen_fnb {
    padding: 10px;
    text-align: center;
}
/* Cabecera */
#cabecera {
    background-color: #f4f4f4;
    padding: 1em 0;
    margin-bottom: 20px;
}

#cabecera h1 {
    text-align: center;
    color: #fff;
    font-family: "Georgia", Arial, sans-serif;
}

/* Menú de navegación */
nav {
    background-color: #B51032;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* clave para responsive */
    padding: 10px;
    position: sticky;
    top: 0; 
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
    margin: 0;
    list-style: none;
}

nav ul li {
      margin: 5px;
}

nav ul li a {
    display: block;
    color: white;
    text-decoration: none;
    font-weight: bold;
    
    /*  ACCESIBILIDAD */
    font-size: 1rem;
    padding: 12px 16px; /* más área táctil */
    min-width: 120px; /* evita texto aplastado */
    text-align: center;

    border-radius: 6px;
}

nav ul li a:hover,
nav ul li a:focus {
    background-color: #333;
    outline: 2px solid #fff; /*  foco visible */
}
@media (max-width: 768px) {

    nav ul {
        flex-direction: column;
        align-items: stretch;
    }

    nav ul li a {
        width: 100%;
        font-size: 1.1rem; /*  más grande en móvil */
        padding: 14px;
        border-bottom: 1px solid rgba(255,255,255,0.2);
    }
}

/* Principal */
#principal {
    min-height: 400px;
    flex-grow: 1;
}

/* Formularios */
form {
    margin-bottom: 2em;
}

label {
    display: block;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5em;
    text-align: center;
}

input, select, button {
    width: 50%;
    padding: 0.8em;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-sizing: border-box;
    margin-bottom: 1em;
}

button {
    background: #B51032;
    color: white;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: #7d0f23;
}

/* Elementos del formulario */
#form {
    background: #fff;
    padding: 2em;
    border: 1px solid #B51032;
    border-radius: 8px;
    width: 100%;
    max-width: 350px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    margin: 0 auto;
    margin-bottom: 5%;
}

/* Párrafos */
p {
	font-size: 1rem;
    line-height: 1.6;
    text-align: left;
    margin: 0 auto;
	color: #333; /* en vez de rojo para lectura larga */
}

/* Tablas */
table {
    width: 90%;
    margin: 40px auto; /* Centrado y un margen arriba para no pegarse a la parte superior */
    border-collapse: collapse;
}

td, th {
    border: 1px solid #B51032;
    padding: 0.5em;
    text-align: left;
	white-space: normal;        /*permite salto de línea */
    word-break: break-word;  
}

tr:nth-child(even) {
    background-color: #f4f4f4;
}

th {
    background-color: #B51032;
    color: white;
    padding: 10px;
}

.tabla_clubes {
    margin-bottom: 50px;
}

.registro_pabellones {
    font-family: "Century Gothic", "Gill Sans", Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin-top: 150px;
    height: 100%;
    text-align: center;
}

.calendario-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    background-color: #f4f4f4;
}

/* Estilo de cada partido */
.partido-card {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}

/* Fecha y hora */
.fecha-hora {
    font-size: 14px;
    color: #555;
    margin-bottom: 5px;
}

.pabellon {
    font-size: 12px;
    color: #888;
    margin-bottom: 15px;
}

/* Equipos */
.equipos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.equipo-local, .equipo-visitante {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.versus {
    
    font-size: 18px;
    font-weight: bold;
    color: #555;
}

/* Botón de estado */
.estado-partido {
    margin-top: 15px;
}

.btn-prepartido {
    background-color: #f44336;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-prepartido:hover {
    background-color: #d32f2f;
}
/* Contenedor principal */
.calendario-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
    background-color: #f8f9fa;
}

.partido-card {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 0.5fr;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.partido-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
}

.partido-fecha-hora {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.fecha-hora {
    font-size: 14px;
    color: #555;
    margin-bottom: 5px;
    text-align: left;
    width: 100%;
}

.pabellon {
    font-size: 12px;
    color: #888;
    margin-bottom: 15px;
    text-align: left;
    width: 100%;
}

.equipos {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Dos columnas flexibles y una fija para el guion */
    align-items: center;
    text-align: center;
    width: 100%;
}

.equipo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.equipo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
}

.equipo-local {
    text-align: left; /* Alinea los nombres de los equipos locales a la derecha */
    font-weight: bold;
}

.equipo-visitante {
    text-align: right; /* Alinea los nombres de los equipos visitantes a la izquierda */
    font-weight: bold;
}

.equipo span {
    font-size: 16px;
    font-weight: bold;
}

.versus {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

.estado-partido {
    text-align: center;
}

.btn-prepartido {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background: #d9534f;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 auto;
}

.btn-prepartido:hover {
    background: #c9302c;
}
.tabla-responsive {
    width: 90%;
    max-width: 800px;
    margin: 0 auto; /*centra */
    overflow-x: auto; /*scroll solo si hace falta */
}

#tabla_contacto {
	width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    text-align: center;
}

#tabla_contacto input,
#tabla_contacto select,
#tabla_contacto button {
    width: 100%;
}

.contenedor-cierre-sesion {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
}

.contenedor-cierre-sesion h2 {
    color: #B51032;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.contenedor-cierre-sesion button {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background-color: #B51032;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    max-width: 400px; /* Ancho máximo */
}


.contenedor-cierre-sesion button:hover {
    background-color: #7d0f23;
}

/* Estilo para el mensaje que sugiere añadir un pabellón */
.mensaje-aviso {
    width: 55%;
    font-family: 'Arial', sans-serif;
    font-size: 0.8em;
    color: #d9534f; /* Color rojo suave */
    background-color: #f9eaea; /* Fondo tenue para destacar sin ser agresivo */
    border: 1px solid #d9534f;
    padding: 10px;
    border-radius: 5px;
    margin: 0 auto;
    margin-bottom: 15px;
}

.mensaje-aviso p{
    text-align: center;
}

/* Estilo para el enlace dentro del mensaje */
.mensaje-aviso a {
    color: #c9302c; /* Color rojo más oscuro para el enlace */
    text-decoration: none;
    font-weight: bold;
}

.mensaje-aviso a:hover {
    text-decoration: underline;
}

.club-imagen {
    max-width: 50%;    /* La imagen no se excederá del 100% del ancho de la celda */
    max-height: 50%;   /* La imagen no será más alta que la celda */
    height: auto;       /* Mantiene la relación de aspecto */
    width: auto;        /* Mantiene la relación de aspecto */
    object-fit: cover; /* Ajustar la imagen para cubrir el contenedor sin deformarse */
}

.resultados-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90%;
	max-width: 800px;
	margin: 0 auto; /* Centrado real*/
    min-height: 0;
}

.resultado {
    display: flex;
    flex-direction: column;
	overflow: hidden;
    /*justify-content: center;*/
    align-items: center;
    width: 100%;
	max-width: 700px;
    background: linear-gradient(to right, #ffebee, #ffcdd2);
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    text-align: center;
    border-left: 6px solid #d32f2f;
	margin: 2em auto;
	/*margin-top: 5em;*/
    padding: 10px;
    /*color: darkslateblue;*/
	box-sizing: border-box;
	
}

.resultado p {
    text-align: left;
}

.fecha-hora {
    font-weight: bold;
    color: #d32f2f;
    margin-bottom: 10px;
    font-size: 1em;
    margin-top: 10px;
    margin: 0 auto;
}

.equipos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /*font-size: 1.3em;
    font-weight: bold;*/
	flex-wrap: wrap;
	gap: 10px;
}

.equipo {
  /*  display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
    padding: 10px;*/
	flex: 1;
	min-width: 120px;
	text-align:center;
}

.puntos {
    font-weight: bold;
    font-size: 2em;
    color: #333;
    margin-top: 5px;
}

.pabellon {
    font-style: italic;
    color: #777;
    font-size: 0.9em;
    margin-top: 10px;
    margin: 0 auto;
}

.iconos {
    position: absolute;
    top: 10px;
    right: 15px;
    display: flex;
    gap: 10px;
}


/* Pie de página */
#pie {
    margin-top: 2em;
    color: #B51032;
    border-top: 2px solid #B51032;
    padding-top: 1em;
    font-size: 0.9em;
    text-align: center;
}

.copyright {
    text-align: center;
}

/* Resaltado de errores */
.error {
    padding-left: 5px;
    color: crimson;
    font-size: small;
}

/* Tablets */

    p {
        font-size: 1.1em;
        text-align: center;
    }

    #form {
        width: 90%;
        padding: 1.5em;
    }

    input,
    select,
    button {
        width: 100%;
        font-size: 0.95em;
    }

    .mensaje-aviso {
        width: 90%;
        font-size: 0.9em;
    }

    .inicio_sesion,
    .registar,
    .registro_pabellones {
        margin-top: 50px;
        padding: 20px;
    }

/* Pantallas muy pequeñas */
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    .noticia-card,
    .resultado,
    .partido-card {
        padding: 10px;
    }

    .noticia-card h3 {
        font-size: 16px;
    }

    .btn-ver-mas,
    .btn-prepartido,
    button {
        width: 100%;
        font-size: 0.9em;
        padding: 10px;
    }

    .equipo img {
        width: 30px;
        height: 30px;
    }

    .puntos {
        font-size: 1.5em;
    }

    .iconos {
        position: static;
        justify-content: center;
        margin-top: 10px;
    }
}
